package logic.hashfunctions;

public class HashFunction1 extends AbstractHashFuncion {

	@Override
	public Integer generateHash(String word) {

		int mul = 83, mod = 65535;
		int hash = 0;

		for (int i = 0; i < word.length(); ++i) {
			hash = hash * mul;
			hash += Character.codePointAt(word, i); // word[i];
			hash %= mod;
		}

		return hash;
	}

}
